package com.atcc.demo.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.atcc.demo.dao.ClassInfo;
import com.atcc.demo.service.ClassService;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@Api(tags="班级信息查询")
@RequestMapping("/classinfo")
public class ClassController {
	
	@Autowired
	ClassService classService;
	
	@ApiOperation(value="根据姓名查询班级",notes="根据姓名查询班级")
	@GetMapping("/ByName")
	public List<ClassInfo> getclassinfoByName(@RequestParam("Name") String name
			) {
		return classService.getClassByName(name);
	}
 
	
}
